<template>
    <div class="goodDesc-container">
        <h1>{{ goodsdesc.title }}</h1>
        <hr>
        <div v-html="goodsdesc.content"></div>
    </div>
</template>

<script>
export default {
    data () {
        return {
            id:this.$route.params.id,
            goodsdesc:{}
        }
    },
    created() {
        this.getGoodsDesc()
    },
    methods:{
        // 商品图文介绍
        getGoodsDesc () {
            this.$http.get('api/goods/getdesc/'+this.id).then(res =>{
                if(res.body.status === 0) {
                    this.goodsdesc = res.body.message[0]
                }else{
                    console.log('加载失败')
                }
            })
        }

    }
}
</script>

<style lang="scss" socped>
.goodDesc-container {
    background-color:white;
    padding: 4px;
    h1{
        font-size: 14px;
        text-align: center;
        color:#26A2FF;
        margin-top: 10px;
    }
    img{
        width: 100%;
        height: 100%;
    }
}
</style>

